Skip to content

Conversation

ahgraber
Copy link
Contributor

@ahgraber ahgraber commented May 7, 2025

The current implementations of the synthesizers (in particular, MultiHopAbstractQuerySynthesizer and MultiHopSpecificQuerySynthesizer) have hard-coded values for the node- and relationship- properties/types they look for when generating scenarios and samples. This works when using the default knowledge graph transforms, but may cause unexpected behavior (or force users to use the expected hardcoded values when they do not actually correspond to the reality of property lineage) when using customized the knowledge graph transformations.

This PR allows flexibility in defining the node-property, relationship-property, and relationship-type expected by the *QuerySynthesizers, while retaining the current behavior as default

The bulk of this PR is nonbreaking, but there may be a breaking typo fix in the SingleHopSpecificQuerySynthesizer default name.

  • feat: allow user-defined node- and relationship- properties in MultiHopAbstractQuerySynthesizer
    • Users should be able to set the relationship property to use for identifying clusters and the node property used for identifying abstract concepts.
    • This will not change default behavior, but allows users to override.
  • feat: allow user-defined node- and relationship- properties in MultiHopSpecificQuerySynthesizer
    • Users should be able to set the relationship type to use for identifying clusters and the relationship property used for identifying overlapping concepts within the triple.
    • This will not change default behavior, but allows users to override.
  • fix!: typo in SingleHopSpecificQuerySynthesizer name (single_hop_specifc_query_synthesizer -> single_hop_specific_query_synthesizer)
  • docs: minor docstring updates to SingleHopSpecificQuerySynthesizer

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 7, 2025
@ahgraber
Copy link
Contributor Author

ahgraber commented May 8, 2025

Failing unit tests seem to be triggered by the typo correction; lmk if changes are needed or if I should revert it.

@ahgraber ahgraber force-pushed the feature/knowledgegraph-flexibility branch 2 times, most recently from 1cad1da to 33c7b5c Compare July 8, 2025 13:30
@ahgraber ahgraber force-pushed the feature/knowledgegraph-flexibility branch from 33c7b5c to cbed49d Compare July 18, 2025 16:52
@ahgraber ahgraber closed this Aug 26, 2025
@ahgraber ahgraber force-pushed the feature/knowledgegraph-flexibility branch from cbed49d to 40eafca Compare August 26, 2025 15:53
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Aug 26, 2025
…opAbstractQuerySynthesizer

Users should be able to set the relationship property to use for identifying clusters and the node property used for identifying abstract concepts.
This will not change default behavior, but allows users to override.
feat: allow user-defined node- and relationship- properties in MultiHopSpecificQuerySynthesizer
Users should be able to set the relationship type to use for identifying clusters and the relationship property used for identifying overlapping concepts within the triple.
This will not change default behavior, but allows users to override.
fix!: typo in SingleHopSpecificQuerySynthesizer name (single_hop_specifc_query_synthesizer -> single_hop_specific_query_synthesizer)
docs: minor docstring updates to SingleHopSpecificQuerySynthesizer
@ahgraber ahgraber reopened this Aug 26, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant